{% extends parent_template|default:"startup/base.html" %}

{% block title %}
    {{ startup.name }}
{% endblock %}

{% block content %}
<h2>{{ startup.name }}</h2>
    <ul>
     <li>
         <a href="{{ startup.get_update_url }}">
             Update
         </a>
     </li>
    <li>
        <a href="{{ startup.get_delete_url }}">
            Delete
        </a>
    </li>
    </ul>
<dl>
    <dt>Date Founded</dt>
        <dd>{{ startup.founded_date|date:"D d M Y" }}</dd>
    <dt>Website</dt>
        <dd>{{ startup.website|urlize }}</dd>
    <dt>Contact</dt>
        <dd>{{ startup.contact }}</dd>

    {% with tag_list=startup.tags.all %}
        <dt>Tag{{ tag_list|pluralize }}</dt>
        {% for tag in tag_list %}
            <dd><a href="{{ tag.get_absolute_url }}">
                {{ tag.name|title }}
            </a></dd>
        {% endfor %}
    {% endwith %}
</dl>
{{ startup.description|linebreaks }}
<section>
    <p><a href="{{ startup.get_newslink_create_url }}">
        Add link to article
    </a></p>
    <ul>
        {% for newslink in startup.newslink_set.all %}
            <li>
                <a href="{{ newslink.link }}">
                    {{ newslink.title|title }}
                </a>
                <a href="{{ newslink.get_update_url }}">
                    [Modify Link]
                </a>
                <a href="{{ newslink.get_delete_url }}">
                    [Delete Link]
                </a>
            </li>
        {% endfor %}
    </ul>
</section>
{% endblock %}